import request from '@/utils/request'

// 查询留言列表
export function listLeaveWord(query) {
  return request({
    url: '/leaveWord/listByDto',
    method: 'get',
    params: query
  })
}

// 查询留言详细
export function getLeaveWord(leaveWordId) {
  return request({
    url: '/leaveWord/findById/' + leaveWordId,
    method: 'get'
  })
}

// 删除留言
export function delLeaveWord(leaveWordId) {
  return request({
    url: '/leaveWord/deleteByIds/' + leaveWordId,
    method: 'delete'
  })
}

// 留言状态修改
export function changeLeaveWordStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/leaveWord/changeStatus',
    method: 'put',
    data: data
  })
}